package com.yanmaohu.yulia.bean;

/**
 * @author Bright Lee
 */
public final class TransactionAccessMode implements TransactionMode {

    private int beginIndex;
    private int endIndex;
    private boolean readOnly;
    private boolean readWrite;

    public TransactionAccessMode(int beginInex, int endIndex, boolean readOnly, boolean readWrite) {
        this.beginIndex = beginInex;
        this.endIndex = endIndex;
        this.readOnly = readOnly;
        this.readWrite = readWrite;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public boolean isReadOnly() {
        return readOnly;
    }

    public boolean isReadWrite() {
        return readWrite;
    }

}
